﻿<template>
    <div>
        <div>
            <h3 v-show="xs">你查到的用户名:{{jieshou.username}}</h3>
            <h3 v-show="xs">你查到的密码:{{jieshou.userpasswd}}</h3>
        </div>
    </div>
</template>

<script>
export default {
  name: 'List',
  components: {},
  data() {
      return {
        jieshou:[],
        xs: false,
      }
  },
  beforeCreate(){
      this.$bus.$on('sendMessage',(data)=>{
          console.log('接收到数据了:',data)
          this.xs = true
          this.jieshou = data
      })
  },
  beforeDestroy(){
      this.$bus.$off('sendMessage')
  }
}
</script>

<style>

</style>